from chimera.util.astrometrynet import AstrometryNet
import sys
filepath=sys.argv[1]
file = open(filepath, 'r')
for line in file:
	while line.endswith('\n') or line.endswith('\t') or line.endswith(' '): line = line[0:-1]
	try:
		AstrometryNet.solveField(line, findstarmethod='sex')
	except Exception, e:
		print e
		
